<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>金字塔</title>
	<style>
		*{
			font-family:微软雅黑;
		}
	</style>
</head>
<body>
	<script>
		for(var i = 1;i<40;i=i+2){
			for(var b = 40;b>i;b=b-2){
				document.write("&nbsp");
			}
			for(var c = 0;  c<i;c++){
				document.write("*");
			}
			document.write("<br>")
		}
	</script>
</body>
</html>